<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../modules/checkA.php");

include_once("../../../config.php");
include_once("../controller/plate-edit.php");
?>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link href="../css/<? echo $theme_folder ?>/user.css" rel="stylesheet" type="text/css"/>
       <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
    <?php include 'modules/head.php'; ?>

</head>


<body>

<div id="topbar">   <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?></div>


<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_ . '/controlbase/modules/sidebar.php'; ?>
        </div>


        <div id="content" class="layui-form">
            <h1> 设置 </h1>




            <div class="detail-box  layui-form">

                <div class="detail-boxes">
                    <form id="edit-member-form" method="post"
                          action="../controller/plate-edit-function.php"
                          enctype="multipart/form-data" class="layui-form detail-boxing">




                        <div class="layui-form-item">
                            <label class="layui-form-label">是否公开</label>
                            <div class="layui-input-block" >
                                <input type="radio" name="ai_visitmod"  value="全公开"       title="全公开"      <? if($unit_setting['visitmod']=="全公开")      {echo "checked";} ?>>
                                <input type="radio" name="ai_visitmod"  value="仅所属"       title="仅所属"      <? if($unit_setting['visitmod']=="仅所属")      {echo "checked";} ?>>
                                <input type="radio" name="ai_visitmod"  value="所属及无所属" title="所属及无所属"  <? if($unit_setting['visitmod']=="所属及无所属"){echo "checked";} ?>>
                                <div class="notice">全公开:就是所有联系人资料都公开查阅；仅所属：只能查看自己跟进的联系人的资料；所属及无所属：能查看自己跟进的联系人资料同时，未分配跟进人的联系人。</div>
                            </div>
                        </div>




                        <div class="layui-form-item">
                            <label class="layui-form-label">客户标签</label>
                            <div class="layui-input-block">
                                <input type="text" name="ai_tag"   autocomplete="off" class="layui-input" value="<?echo $unit_setting['tag']?>">
                                <div class="notice"> 每个标签请以分号；分开,中英文分号均可。</div>
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <label class="layui-form-label">用户评级</label>
                            <div class="layui-input-block">
                                <input type="text" name="ai_rank"   autocomplete="off" class="layui-input" value="<?echo $unit_setting['rank']?>">
                                <div class="notice"> 每个标签请以分号；分开,中英文分号均可。</div>
                            </div>
                        </div>



                        <div class="layui-form-item">
                            <label class="layui-form-label">联系渠道</label>
                            <div class="layui-input-block">
                                <input type="text" name="ai_contact_way"   autocomplete="off" class="layui-input" value="<?echo $unit_setting['contact_way']?>">
                                <div class="notice"> 每个标签请以分号；分开,中英文分号均可。</div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">客户来源</label>
                            <div class="layui-input-block">
                                <input type="text" name="ai_customer_source"   autocomplete="off" class="layui-input" value="<?echo $unit_setting['customer_source']?>">
                                <div class="notice"> 每个标签请以分号；分开,中英文分号均可。</div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">行业类型</label>
                            <div class="layui-input-block">
                                <input type="text" name="ai_industry_type"   autocomplete="off" class="layui-input" value="<?echo $unit_setting['industry_type']?>">
                                <div class="notice"> 每个标签请以分号；分开,中英文分号均可。</div>
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <label class="layui-form-label">侧边栏显示</label>
                            <div class="layui-input-block" >
                                <input type="radio" name="ai_sidebar_show"  value="显示"       title="显示"      <? if($_plate['setting']['sidebar_show']=="显示")      {echo "checked";} ?>>
                                <input type="radio" name="ai_sidebar_show"  value="隐藏"       title="隐藏"      <? if($_plate['setting']['sidebar_show']=="隐藏")      {echo "checked";} ?>>
                                <div class="notice">控制是否在侧边栏显示</div>
                            </div>
                        </div>



                        <input type="hidden" name="nid" value="<? echo $unit_setting['nid']?>">
                        <input name="sys_part"  type="hidden"  value="<? echo $_REQUEST['sys_part'] ?>"/>


                        <div class="function">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="formMemberAdd" type="submit">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>



                    </form>
                </div>
            </div>





            <!--content端點01-->
        </div>
        <!--maincontent端點01-->
        <br class="clearfloat"/>
    </div>
    <!--container端點01-->
</div>


<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?> </body>


<script>
    layui.use('upload', function(){
        var $ = layui.jquery
            ,upload = layui.upload;

        //普通图片上传
        var uploadInst = upload.render({
            elem: '#test1'
            ,url: 'https://httpbin.org/post' //改成您自己的上传接口
            ,accept: 'file' //普通文件
            ,exts: 'jpg|jpeg|png|gif' //只允许上传压缩文件
            ,size: 60 //限制文件大小，单位 KB
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#demo1').attr('src', result); //图片链接（base64）
                });
            }
            ,done: function(res){
                //如果上传失败
                if(res.code > 0){
                    return layer.msg('上传失败');
                }
                //上传成功
            }
            ,error: function(){
                //演示失败状态，并实现重传
                var demoText = $('#demoText');
                demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
                demoText.find('.demo-reload').on('click', function(){
                    uploadInst.upload();
                });
            }
        });




    });
</script>


<?php include_once('../../modules/footer.php'); ?> </body>
</html>

